<template>
  <div>

    <el-form style="text-align: left" class="indexell" label-width="130px">
      <el-row>
        <el-col :span="6">
          <el-form-item class="form-box" label="前置评估费:" >
            <el-input
              v-model="form.frontMoney"
              class="indexBOX"
              placeholder="请输入"
            ></el-input>
            <span class="pos right">元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="收费时间:" >
            <el-date-picker
              v-model="form.frontChargingTime"
              type="datetime"
              placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" :append-to-body="false">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item class="form-box" label="后置评估费:" >
            <el-input
              v-model="form.postMoney"
              class="indexBOX"
              placeholder="请输入"
            ></el-input>
            <span class="right">元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="收费时间:" >
            <el-date-picker
              v-model="form.postChargingTime"
              type="datetime"
              placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" :append-to-body="false">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <!--        目前只显示融银贷 -->
        <!--        <el-row  v-if="form.orderMark==0">-->
        <div>
          <el-col :span="6">
            <el-form-item class="form-box" label="前置服务费:" >
              <el-input
                v-model="form.frontServiceMoney"
                class="indexBOX"
                placeholder="请输入"
              ></el-input>
              <span class="right">元</span>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="收费时间:" >
              <el-date-picker
                v-model="form.frontServiceChargeTime"
                type="datetime"
                placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" :append-to-body="false">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <!--        </el-row>-->
        </div>
        <el-col :span="6">
          <el-form-item class="form-box" label="保证金:" >
            <el-input
              v-model="form.margin"
              class="indexBOX"
              placeholder="请输入"
              readonly
            ></el-input>
            <span class="pos right">元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="收费时间:" >
            <el-date-picker
              v-model="form.marginTime"
              type="datetime"
              placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" :append-to-body="false">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item class="form-box" label="其他费用:" >
            <el-input
              v-model="form.otherMoney"
              class="indexBOX"
              placeholder="请输入"
            ></el-input>
            <span class="pos right">元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="收费时间:" >
            <el-date-picker
              v-model="form.otherChargingTime"
              type="datetime"
              placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" :append-to-body="false">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item class="form-box" label="支付担保保证金：" >
            <el-input
              v-model="form.securityDeposit"
              class="indexBOX"
              placeholder="请输入"
            ></el-input>
            <span class="pos right">元</span>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="支付时间:" >
            <el-date-picker
              v-model="form.securityDepositTime"
              type="datetime"
              placeholder="选择日期时间" value-format="yyyy-MM-dd HH:mm:ss" :append-to-body="false">
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item class="form-box" label="备注:" >
            <el-input
              v-model="form.financialRemark"
              class="indexTextarea"
              placeholder="请输入"
              type="textarea"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24" >
          <el-form-item class="btn-box" label-width="100px">
            <el-button type="primary" @click="updateFinancial">确认</el-button>
          </el-form-item>
        </el-col>
      </el-row>

    </el-form>
  </div>
</template>

<script>
import { updateFinancial } from "../../assets/js/api";

export default {
  name: "financialInfoForm",
  props:['form'],
  data(){
    return{
      showBtn:false
    }
  },
  mounted() {
    console.log(this.form)
  },
  methods:{
    //修改信息
    updateFinancial(){
      updateFinancial(this.form).then(()=>{
        this.$message.success('修改成功');
        this.$emit("closeDialog")
      })
    },
  },
};
</script>

<style scoped>

::v-deep .el-input__inner{
  height: 32px;
}
::v-deep .el-date-editor.el-input{
  width: auto;
}


.form-box .right {
  color: #1d2029;
  position: absolute;
  right: 5px;
  z-index: 1;
}

.btn-box  {
  text-align: center ;
}
.el-button {
  line-height: 5px;
  height: 30px;
}

</style>